import { nFormatter } from '@/utils/nFormatter'

export default {
  brush: {
    toolbox: ['lineX', 'clear'],
    throttleType: 'debounce',
    throttleDelay: 300
  },
  tooltip: {
    formatter: function(val) {
      const { name, value } = val
      return `范围:${name}<br />值:${value}`
    }
  },
  xAxis: {
    type: 'category',
    splitLine: {
      lineStyle: {
        type: 'dashed'
      }
    },
    axisLine: {
      onZero: false,
      lineStyle: {
        color: '#31597d'
      }
    }
  },
  yAxis: {
    type: 'value',
    name: '用气量',
    axisLabel: {
      formatter: function(val) {
        return nFormatter(val)
      }
    },
    splitLine: {
      lineStyle: {
        color: '#31597d',
        type: 'dashed'
      }
    },
    nameTextStyle: {
      color: '#fff'
    },
    axisLine: {
      onZero: false,
      lineStyle: {
        color: '#31597d'
      }
    }
  },
  grid: {
    left: '6%',
    right: '3%',
    top: 40,
    bottom: 25
  }
}
